<template>
	<div>
		<router-link to="/home">点我去home</router-link>
		<span>&nbsp;</span>
		<router-link to="/about">点我去about</router-link>
		<span>&nbsp;</span>
		<router-link :to="obj">点我去profile</router-link>
		<!-- <button @click="toHomePage">home</button>
		<button @click="toAboutPage">about</button> -->
		<div>
			<p>div的内容：</p>
			<router-view></router-view>
		</div>

	</div>
</template>

<script>
export default {
	name: 'App',

	data() {
		return {
			obj: {
				path: '/profile/' + 123,
				query: { name: 'cuifan' },
			},
		}
	},

	mounted() {},

	methods: {
		// toHomePage() {
		// 	this.$router.push('/home')
		// },
		// toAboutPage() {
		// 	this.$router.push('/about/2')
		// },
	},
}
</script>

<style>
.cuifan {
	color: red;
}

.jiamin {
	font-size: 30px;
}
</style>